/*
ID: ning yusui
PROG: frac1
LANG: C++
*/
#include <iostream>
#include <fstream>
#include <string>
#include <set>
#include <map>
#include <algorithm>

using namespace std;



int gcd(int m, register int n)
{
    int t;
    while (n!=0)
    {
        t=m%n;
        m=n;
        n=t;
    }
    return m;
}
struct Node
{
	int first, second;
	Node(int i,int j):first(i),second(j){}
    friend bool operator < ( const Node &x, const Node &y)
    {
        return x.first*y.second < x.second*y.first;
    }
};

set<Node> ans;
int main ()
{
    ifstream fin("frac1.in");
    ofstream fout("frac1.out");
    int n;
    fin>>n;
    for (int i=1; i<n; i++)
    {
        for (int j=i+1;j<=n ;j++ )
        {
            if (gcd(j,i) ==1)
            {
                ans.insert(Node(i,j));
            }
        }
    }
    fout<<"0/1\n";
    set<Node > ::iterator it=ans.begin();
    for (;it!=ans.end() ;it++ )
    {
        fout<<it->first<<'/'<<it->second<<'\n';
    }
    fout<<"1/1\n";
    return 0;
}

